package com.ytf.test.eighth;

/**
 * @author: YTF
 * @date: 2025/1/3 14:55
 * @version: 1.0
 * @description:
 */
public class Music2 {
    private static void tune(Wind instrument) {
        instrument.play(Note.MIDDLE_C);
    }
    private static void tune(Stringed instrument) {
        instrument.play(Note.MIDDLE_C);
    }
    private static void tune(Brass instrument) {
        instrument.play(Note.MIDDLE_C);
    }

    public static void main(String[] args) {
        Wind wind = new Wind();
        Stringed stringed = new Stringed();
        Brass brass = new Brass();
        tune(wind);
        tune(stringed);
        tune(brass);
        /**
         * Output:
         * Wind.play()MIDDLE_C
         * Stringed.play()MIDDLE_C
         * Brass.play()MIDDLE_C
         */
    }
}
